package jvm;

public class HelloStackOverFlow {

	private static int counter =0 ;
	
	// xss   线程的栈大小   Xms 初始的堆的大小    Xms 最大堆的大小 
	// -verbose:gc -Xms10M -Xmx10M -Xss108k -XX:+PrintGCDetails
	// 
	public void count(){
		
		System.out.println("The stack frame depth is : "+ (++ counter));
		
		count(); 
		
	}
	
	public static void main(String[] args) {
		System.out.println("HelloStackOverFlow");
		
		HelloStackOverFlow helloStackOverFlow = new HelloStackOverFlow();
		
		try {
			
			helloStackOverFlow.count();
			
			
		} catch (Exception e) {
			System.out.println("The Stack Frame depth is :"+ (++ counter));
			e.printStackTrace();
			throw e;
			
		}
		

	}

}
